package com.yxq.mdt.app.modules.login.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;

import com.yxq.mdt.app.R;
import com.yxq.mdt.app.base.BaseActivity;
import com.yxq.mdt.app.modules.login.bean.UserBean;
import com.yxq.mdt.app.modules.login.model.LoginModel;
import com.yxq.mdt.app.modules.login.presenter.ILoginContract;
import com.yxq.mdt.app.modules.login.presenter.LoginPresenter;
import com.yxq.mdt.app.modules.main.ui.MainActivity;

import butterknife.OnClick;

/**
 * @author L
 * @time
 * @describe 手机号码登录
 */
public class PhoneLoginActivity extends BaseActivity<LoginPresenter> implements ILoginContract.View {


    @Override
    public int getLayoutId() {
        return R.layout.activity_phone_login;
    }

    @Override
    public void initView() {
        mPresenter = new LoginPresenter(this, new LoginModel());
    }

    @Override
    public void initData(@Nullable Bundle savedInstanceState) {

    }

    @OnClick({R.id.login_btn_login, R.id.login_btn_code_login})
    public void onClicked(View view) {
        switch (view.getId()) {
            case R.id.login_btn_login:
                Intent intent = new Intent(PhoneLoginActivity.this, MainActivity.class);
                startActivity(intent);
                finish();
                break;
            case R.id.login_btn_code_login:
                finish();
                break;
        }
    }

    @Override
    public void onLoginSuccess(UserBean userBean) {

    }

    @Override
    public void onLoginFailed(String error) {

    }

    @Override
    public void onVerifyCodeSuccess(String info) {

    }

    @Override
    public void onVerifyCodeFailed(String error) {

    }

    @Override
    public void onRegisterSuccess(String userBean) {

    }

    @Override
    public void onRegisterFailed(String error) {

    }

    @Override
    public void onBindPhoneSuccess(String userBean) {

    }

    @Override
    public void onBindPhoneFailed(String error) {

    }
}
